﻿using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace EpiNEXT.Core
{
    public class ProjectInfo : ObservableObject
    {
        public string Title { get; set; }
        public FileInfo FileInfo { get; set; }
        public string Summary { get; set; }
        public string Description { get; set; }
        public string Author { get; set; }
        public DateTime LastSaved { get; set; }
        public DateTime Created { get; set; }
        public string Version { get; set; }
        //public byte[] ImageBytes { get; set; }
        public bool IsNewProject { get; set; }
        public ObservableCollection<FormInfo> Forms { get; set; }
        public bool IsExistingProject
        {
            get
            {
                return !IsNewProject;
            }
        }

        //public BitmapImage Image
        //{
        //    get
        //    {
        //        BitmapImage bitmapimage = new BitmapImage();

        //        if (ImageBytes != null)
        //        {
        //            bitmapimage.BeginInit();

        //            MemoryStream imageStream = new MemoryStream(ImageBytes);
        //            bitmapimage.StreamSource = imageStream;

        //            bitmapimage.EndInit();
        //        }

        //        return bitmapimage;
        //    }
        //}

        public ProjectInfo()
        {
            IsNewProject = false;
            Forms = new ObservableCollection<FormInfo>();
        }
    }
}
